<template>
  <h1>{{ count.value }}</h1>
  <button @click="btn(1)">点击加1</button>
  <button @click="btn(20)">点击加20</button>
</template>

<script>
import { ref } from 'vue';
export default {
  setup() {
    const count = ref(0);
    const btn = (number) => {
      count.value += number;
    };
    return { count, btn };
  },
};
</script>
